{include file="index/header" /}
<div class="layui-card">
    <div class="layui-card-body">
        <table class="layui-hide" id="tools_list" lay-filter="tools_list"></table>
    </div>
</div>
<script type="text/html" id="toolbar">
    <div class="layui-layout-left" style="left: 0">
        <div class="layui-form-item">
            <div class="layui-input-inline">
                <input type="text" name="search" required lay-verify="required" placeholder="请输入筛选内容"
                       autocomplete="off" class="layui-input">
            </div>
            <div class="layui-input-inline">
                <button class="pear-btn pear-btn-primary" lay-event="search"><i class="layui-icon layui-icon-search"></i> 筛选</button>
            </div>
        </div>
    </div>
    <div class="layui-layout-right">
        <button plain class="pear-btn pear-btn-warming" lay-event="import"><i class="layui-icon layui-icon-util"></i> 导入</button>
        <button plain class="pear-btn pear-btn-primary" lay-event="add"><i class="layui-icon layui-icon-add-1"></i> 添加</button>
        <button plain class="pear-btn pear-btn-danger" lay-event="delete"><i class="layui-icon layui-icon-delete"></i> 删除</button>
    </div>
</script>
<script>
    layui.use(['jquery', 'table', 'form', 'upload'], function () {
        var $ = layui.jquery,
            T = layui.table,
            F = layui.form,
            U = layui.upload;

        T.render({
            elem: '#tools_list'
            , height: 'full-200'
            , url: "{:url('getList')}" //数据接口
            , page: true //开启分页
            , skin: 'line'
            , toolbar: '#toolbar'
            ,defaultToolbar: false
            ,cols: [[ //表头
                {field: 'id', title: 'ID', width: 80, sort: true, fixed: 'left'}
                , {field: 'name', title: '名称', width: 120}
                , {field: 'type', title: '类别', width: 100, sort: true}
                , {field: 'key', title: '关键字', width: 200}
                , {field: 'desc', title: '描述', width: 200}
                , {field: 'url', title: '地址', width: 100, sort: true}
                , {field: 'sort', title: '排序', width: 80, sort: true}
                , {field: 'id', title: '操作', width: 200, fixed: 'right'}
            ]]
        });
    });
</script>
{include file="index/footer" /}